import request from '@/utils/request';
// const BASE_URL = 'http://101.200.59.101/';

// export async function getComplianceDetail(payload) {
//   // console("resGet",payload.secu_code);
//   return request(`/api/gold/regulatory_violation?api_type=${payload.api_type}`, {
//     ...payload,
//   });
// }

export async function getComplianceDetail(payload) {
  // console.log("payload",payload)
  return request(
    `/api/gold/regulatory_violation?stock_code=${payload.stock_code}&api_type=${payload.api_type}`,
    {
      method: 'GET',
      ...payload,
    }
  );
}

export async function getOtherViolation(payload) {
  return request(`/api/gold/current_year_other_violation?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}

export async function getISPunishData(payload) {
  return request(`/api/gold/industry_supervision_punish_type?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}

export async function getISPunishFiveData(payload) {
  return request(
    `/api/gold/industry_supervision_punish_top_five?stock_code=${payload.stock_code}`,
    {
      ...payload,
    }
  );
}

export async function getException(payload) {
  return request(`/api/gold/financial_exception?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}

// [首页]风险预警 监管风险 经营预警
export async function getJyyjAPI(payload) {
  // console.log("getHgyjAPI",payload)
  return request(`/api/gold/operational_warning`, {
    ...payload,
  });
}
// [首页]风险预警 监管风险 监管违规项
export async function getHgyjAPI(payload) {
  // console.log("getHgyjAPI",payload)
  return request(`/api/gold/regulatory_violation?api_type=${payload.api_type}`, {
    ...payload,
  });
}
// [首页]风险预警 监管风险 市值预警
export async function getSzyjAPI(payload) {
  // console.log("getSzyjAPI",payload)
  return request(`/api/gold/regulatory_violation?api_type=${payload.api_type}`, {
    ...payload,
  });
}
// [首页]风险预警 监管风险 舆情预警
export async function getYqyjAPI(payload) {
  // console.log("getSzyjAPI",payload)
  return request(
    `/api/gold/opinion_list?sensitive_type=${payload.sensitive_type}&similar_merge=${
      payload.similar_merge
    }`,
    {
      ...payload,
    }
  );
}
// 风险预警  市值预警 两融警戒提示
export async function getMarginFinance(payload) {
  return request(`/api/gold/margin_financing?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 风险预警  市值预警 第一股东股权质押风险
export async function getEquity(payload) {
  return request(`/api/gold/equity_pledge?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 风险预警  市值预警 市值异动 举牌风险
export async function getIndexInfo(payload) {
  return request(`/api/gold/index_info?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 风险预警  经营预警 财务数据异常变动
export async function getFDAbnormal(payload) {
  return request(`/api/gold/financial_data_abnormal?stock_code=${payload.stock_code}`, {
    method: 'GET',
    ...payload,
  });
}

// 风险预警  经营预警 财务科目异常变动
export async function getFSAbnormal(payload) {
  return request(`/api/gold/financial_subject_abnormal?stock_code=${payload.stock_code}`, {
    method: 'GET',
    ...payload,
  });
}

// 风险预警  经营预警 奇葩指数异常
export async function getQpzs(payload) {
  return request(`/api/gold/exotic_index_abnormal?stock_code=${payload.stock_code}`, {
    method: 'GET',
    ...payload,
  });
}

// 风险预警  经营预警 特征对比
export async function getMainReport(payload) {
  return request(
    `/api/gold/character_analysis?stock_code=${payload.stock_code}&tab=${payload.tab}&type=${
      payload.type
    }&time=${payload.time}`,
    {
      ...payload,
    }
  );
}
// 风险预警 经营预警 bscore摸鱼指数
export async function getbAbnormal(payload) {
  return request(`/api/gold/bs_fish_index?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 风险预警 经营预警 mscore操纵指数
export async function getmAbnormal(payload) {
  return request(`/api/gold/ms_manipulation_index?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 风险预警 经营预警 altmanz操纵指数
export async function getaAbnormal(payload) {
  return request(`/api/gold/az_index?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 舆情预警  关键词云
export async function getWordCloud(payload) {
  return request(`/api/gold/opinion_word_cloud?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 舆情预警  全网信息走势
export async function getMsgTrend(payload) {
  return request(`/api/gold/opinion_info_trend?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}

// 舆情预警  媒体来源占比
export async function getMediaSource(payload) {
  return request(`/api/gold/opinion_media_rate?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}

// 舆情预警  地域分布
export async function getAreaInfo(payload) {
  return request(`/api/gold/opinion_area_info?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 舆情预警  情绪敏感度
export async function getEmotionInfo(payload) {
  return request(`/api/gold/opinion_emotion_info?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 舆情预警  高频词汇  正面
export async function getPositiveWord(payload) {
  return request(`/api/gold/opinion_positive_word?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 舆情预警  高频词汇  负面
export async function getNegativeWord(payload) {
  return request(`/api/gold/opinion_negative_word?stock_code=${payload.stock_code}`, {
    ...payload,
  });
}
// 舆情预警  敏感信息 微信微博热点
export async function getOpinionMsg(payload) {
  // console.log("payload",payload)
  return request(
    `/api/gold/opinion_list?stock_code=${payload.stock_code}&similar_merge=${
      payload.similar_merge
    }&sensitive_type=${payload.sensitive_type}&origin_type=${payload.origin_type}`,
    {
      method: 'GET',
      ...payload,
    }
  );
}
